import { BasicFetchResult } from '/@/api/model/baseModel';

export interface SfsTurboDtoList {
  shareProto: string;
  size: number;
  num: number;
}
export interface FileSystemDto {
  fileSystemType: string;
  mountPath: string;
}
export interface IfDeployItem {
  isDeployConsole: boolean;
}
export interface SaaSPurchaseInstanceParams {
  tenantCode: string;
  appId: string;
  type: string;
  packageId: string;
  packageType: string;
  paymentType: string;
  deployStrategy?: string;
  expireTime: string;
  isSupportLicenseMgmt: boolean;
  ifSupportFileSystem: boolean;
  isEnableNotification: boolean;
  isIntegrateThirdApp: boolean;
  notificationEnabled: boolean;
  notificationType?: 'sms' | 'email';
  notificationTerminal?: string;
  duration: number;
  sfsTurboDtoList?: SfsTurboDtoList[];
  fileSystemDto?: FileSystemDto;
  dbMultiTenantMode: string;
  appMultiTenantMode: string;
  userId: string | undefined;
  tenantType: number;
  ifDeploy: IfDeployItem;
}
export interface PurchaseInstanceParams {
  processKey: string | undefined;
  packagePurchase: SaaSPurchaseInstanceParams;
}

export type GetInstanceDeployStatusParams = {
  tenantCode: string;
  appId: string;
  type: string;
  specification: number;
  deployStrategy: string;
  dbMultiTenantMode: string;
  appMultiTenantMode: string;
  isTenant: boolean;
};

export interface purchseListItem {
  application: string;
  specification: string;
  order: string;
  duration: string;
}

export interface instancePurchaseParams {
  tenantCode: string | number;
  instanceId: string;
}

export interface saasPurInsParams {
  appId: string;
  type: string;
  deployStrategy?: string;
  expireTime: string;
  dbMultiTenantMode: string;
  appMultiTenantMode: string;
  notificationEnabled: boolean;
  paymentType: string;
  notificationType?: 'sms' | 'email';
  notificationTerminal?: string;
  isTenant: boolean;
}

export type PurchseListGetResultModel = BasicFetchResult<purchseListItem>;

export type StrategyItem = {
  strategy: string;
  desc: string;
};
